Some modern microcontroller systems are organized into power domains. A power manager of the microcontroller system can change a power configuration of a power domain based on the states of one or more modules (e.g., peripherals) in the power domain. Each module within a power domain may turn off independently of other modules in the power domain or other modules in other power domains. For example, a universal asynchronous receiver/transmitter (USART) can be kept awake while a transmit buffer is emptied and then automatically turned off when the task is complete. If the microcontroller system is capable of “sleep walking” the modules may be awoken to perform tasks before going back to sleep. In some systems, power domains may be hierarchical such that a power domain will be turned on if a higher level power domain is turned on even if the power domain has no active modules.
For all the foregoing reasons, debugging microcontroller systems with configurable power domains is difficult without tracing power domain states. Moreover, power domains cannot be instrumented using conventional on-chip debug systems because such debug systems typically require that all power domains in the microcontroller system be active at the same time.